@extends('admin.layout')
@section('title',$title)
@section('content')
	<div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <section class="content-header">
            <h1>
                商品评价管理
                <small>商品评价编辑页面</small>
            </h1>
            <ol class="breadcrumb">
                <li><a href="#"><i class="fa fa-dashboard"></i> 商品评价管理</a></li>
                <li class="active">商品评价编辑</li>
            </ol>
        </section>

        <!-- Main content -->
        <section class="content">
            <div class="row">
                <!-- left column -->
                <div class="col-md-12">
                    <!-- general form elements -->
                    <div class="box box-primary">
                        <div class="box-header with-border">
                            <h3 class="box-title">商品评价编辑</h3>
                        </div><!-- /.box-header -->
                        <!-- form start -->
                        @if(session('error'))
                            {{session('error')}}
                        @endif
                        @if (count($errors) > 0)
                            <div class="alert alert-danger">
                                <ul>
                                    @foreach ($errors->all() as $error)
                                        <li>{{ $error }}</li>
                                    @endforeach
                                </ul>
                            </div>
                        @endif
                        
                        <form role="form" action="/admin/pingjia/update" method="post">
                            {{ csrf_field() }}
                            <input type="hidden" value="{{$data -> id}}" name="id">
                            <div class="box-body">
                                <div class="form-group">
                                    <label for="exampleInputEmail1">店铺名称:</label>
                                    <h3><b>&nbsp;&nbsp;&nbsp;&nbsp;{{$data -> shopname}}</b></h3> 
                                </div>
                                <div class="form-group">
                                    <label for="exampleInputEmail1">商品名称:</label>
                                    <h4><b>&nbsp;&nbsp;&nbsp;&nbsp;{{$data -> goodname}}</b></h4>
                                </div>
                               <div class="form-group">
                                    <label for="exampleInputEmail1">综合评价</label>
                                    <select class="form-control select2" style="width: 20%;" name="zonghe">
                                        <option
                                        @if($data -> zonghe == '好评')
                                        selected="selected"
                                        @endif
                                        >好评</option>
                                        <option
                                        @if($data -> zonghe == '中评')
                                        selected="selected"
                                        @endif
                                        >中评</option>
                                        <option
                                        @if($data -> zonghe == '差评')
                                        selected="selected"
                                        @endif
                                        >差评</option>
                                    </select>
                                </div>
                                <div class="form-group">
                                    <label for="exampleInputEmail1">评价内容</label>
                                    <!-- 加载编辑器的容器 -->
                                    <script id="container" style="width:100%;height:300;" name="content" type="text/plain">{!!$data -> content!!}</script>
                                    <!-- 配置文件 -->
                                    <script type="text/javascript" src="{{asset('/ue/ueditor.config.js')}}"></script>
                                    <!-- 编辑器源码文件 -->
                                    <script type="text/javascript" src="{{asset('/ue/ueditor.all.js')}}"></script>
                                    <!-- 实例化编辑器 -->
                                    <script type="text/javascript">
                                        var ue = UE.getEditor('container');
                                    </script>
                                </div>
                                <div class="form-group">
                                    <label for="exampleInputEmail1">评价时间:</label>
                                    <p><b>&nbsp;&nbsp;&nbsp;&nbsp;{{date('Y-m-d',$data -> ptime)}}</b></p>
                                </div>
                            </div><!-- /.box-body -->

                            <div class="box-footer">
                                <button type="submit" class="btn btn-primary">保存</button>
                                <button type="reset" class="btn btn-danger">重置</button>
                            </div>
                        </form>
                    </div><!-- /.box -->

                   
                </div><!--/.col (left) -->

            </div>   <!-- /.row -->
        </section><!-- /.content -->
    </div><!-- /.content-wrapper -->
@endsection
